using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
using System.Xml.Serialization;
using System.Drawing;

namespace url2jpeg
{
    public enum captureMode { Full, Manual, Document };
    public enum resizeMode { No, Fixed, Percent };
    public enum formatMode { Jpeg, Png, Bmp };

    public class scriptData
    {
        public string name;
        public string url;
        public bool bRemoveScrollBar;
        public bool bAutoResize;
        public Size initialSize;
        public Size sizeOffset;
        public int timeOut;
        public int waitBeforeCapture;
        public captureMode capture;
        public Rectangle captureParam;
        public resizeMode resize;
        public Size resizeParam;
        public formatMode format;

        public override string ToString()
        {
            return name;
        }
    }

    public class scripts : XMLSerialize<scripts>
    {
        public List<scriptData> scriptList;

        public scripts()
        {
            scriptList = new List<scriptData>();
        }
    }

    public class userSettings : XMLSerialize<userSettings>
    {
        static userSettings m_instance = null;

        public string m_defaultLang;
        public string m_email;
        public string m_regkey;

        static public userSettings GetInstance()
        {
            if (m_instance == null)
                m_instance = new userSettings();
            return m_instance;
        }

        static public void SetInstance(userSettings us)
        {
            m_instance = us;
        }
    }
}
